package com.zhonghui.kf.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhonghui.kf.mapper.ProcurementAnswerMapper;
import com.zhonghui.kf.domain.ProcurementAnswer;
import com.zhonghui.kf.service.IProcurementAnswerService;

/**
 * 客服问答Service业务层处理
 * 
 * @author y
 * @date 2023-11-29
 */
@Service
public class ProcurementAnswerServiceImpl implements IProcurementAnswerService 
{
    @Autowired
    private ProcurementAnswerMapper procurementAnswerMapper;

    /**
     * 查询客服问答
     * 
     * @param id 客服问答主键
     * @return 客服问答
     */
    @Override
    public ProcurementAnswer selectProcurementAnswerById(Long id)
    {
        return procurementAnswerMapper.selectProcurementAnswerById(id);
    }

    @Override
    public ProcurementAnswer selectProcurementAnswer(ProcurementAnswer procurementAnswer) {
        return procurementAnswerMapper.selectProcurementAnswer(procurementAnswer);
    }

    /**
     * 查询客服问答列表
     * 
     * @param procurementAnswer 客服问答
     * @return 客服问答
     */
    @Override
    public List<ProcurementAnswer> selectProcurementAnswerList(ProcurementAnswer procurementAnswer)
    {
        return procurementAnswerMapper.selectProcurementAnswerList(procurementAnswer);
    }

    /**
     * 新增客服问答
     * 
     * @param procurementAnswer 客服问答
     * @return 结果
     */
    @Override
    public int insertProcurementAnswer(ProcurementAnswer procurementAnswer)
    {
        return procurementAnswerMapper.insertProcurementAnswer(procurementAnswer);
    }

    @Override
    public int insertBatch(List<ProcurementAnswer> procurementAnswer) {
        return procurementAnswerMapper.insertBatch(procurementAnswer);
    }

    /**
     * 修改客服问答
     * 
     * @param procurementAnswer 客服问答
     * @return 结果
     */
    @Override
    public int updateProcurementAnswer(ProcurementAnswer procurementAnswer)
    {
        return procurementAnswerMapper.updateProcurementAnswer(procurementAnswer);
    }

    /**
     * 批量删除客服问答
     * 
     * @param ids 需要删除的客服问答主键
     * @return 结果
     */
    @Override
    public int deleteProcurementAnswerByIds(Long[] ids)
    {
        return procurementAnswerMapper.deleteProcurementAnswerByIds(ids);
    }

    /**
     * 删除客服问答信息
     * 
     * @param id 客服问答主键
     * @return 结果
     */
    @Override
    public int deleteProcurementAnswerById(Long id)
    {
        return procurementAnswerMapper.deleteProcurementAnswerById(id);
    }
}
